package com.frxuexi.park2209.repair

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.frxuexi.base.entity.RepairBeanItem
import com.frxuexi.park2209.R
import com.frxuexi.park2209.databinding.ActivityRepairDetailBinding

class RepairDetailActivity : AppCompatActivity() {
    lateinit var binding: ActivityRepairDetailBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding=ActivityRepairDetailBinding.inflate(layoutInflater)
        setContentView(binding.root)

        binding.headParkdetail.ivBack.setOnClickListener {
            finish()
        }

        val repair = intent.getSerializableExtra("repair")  as RepairBeanItem
        Log.i("===",repair.toString())

        if(repair.repairUserId==0){
            binding.repairDeSh.setImageResource(R.drawable.ic_action_question)
            binding.repairDeYsh.text="未审核"
        }else{
            binding.repairDeSh.setImageResource(R.drawable.ic_action_ok)
            binding.repairDeShtime.text=repair.repairTime
            binding.repairDeYsh.text="已审核"
        }
//        binding.repairDeTime.text=repair.repairTime
        binding.repairDeTitle.append(repair.repairData)
        binding.repairDeDes.append(repair.repairDescribe)
        binding.repairDeUid.append(repair.userId.toString())

    }
}